using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Homework8.Models
{
    public class School
    {
        public int SchoolId { get; set; }
        
        [Required(ErrorMessage = "学校名称不能为空")]
        public string Name { get; set; } = string.Empty;
        
        public string? Address { get; set; }
        
        public int? FoundingYear { get; set; }
        
        // 导航属性
        public List<Class> Classes { get; set; } = new List<Class>();
    }
} 